package com.ruoyi.common.config;

import com.qcloud.cos.COSClient;
import com.qcloud.cos.ClientConfig;
import com.qcloud.cos.auth.BasicCOSCredentials;
import com.qcloud.cos.auth.COSCredentials;
import com.qcloud.cos.region.Region;

/**
 * 腾讯云上传参数
 * @create: 2019/10/16
 */
public class CosConfig {
    static String endpoint = "ap-beijing";
    static String accessKeyId = "AKID64rRmvfDYquUqzhCamtmQp10lRu9Rfjc";
    static String SecretKey = "lJh4JNKCuQFuQuKhuQq69yb8Zs9GNLCw";
    static String bucket = "zhy-1313472936";

    public COSClient cosClient()
    {
        COSCredentials cred = new BasicCOSCredentials(accessKeyId,SecretKey);
        ClientConfig clientConfig = new ClientConfig(new Region(endpoint));
        COSClient cosClient = new COSClient(cred, clientConfig);
        return cosClient;
    }

}

